﻿using System.Web;
using YawetagLib.Facade;
using YawetagLib.Web.Utilities;

namespace YawetagLib.Web.Facade
{
    public class WebFacadeProvider : IFacadeProvider
    {
        public BaseFacadeFactory GetFactory()
        {
            HttpContextBase httpContext = new HttpContextWrapper(HttpContext.Current);

            return PersistenceHelper.GetHttpContextData(httpContext, "FACADE_FACTORY", () => new WebFacadeFactory(httpContext));
        }
    }
}
